﻿package chapter_04_Homework;

class Work_04_Person {
	String name = "李光";
	public Work_04_Person(){
		System.out.println("execute Work_04_Person()");
	}

	public Work_04_Person(String name) {
		this.name = name;
		System.out.println("execute Work_04_Person(name)");
	}

	class Student extends Work_04_Person{
		String school = "北大青鸟";
		public Student(){
			System.out.println("execute Student()");
		}

		public Student(String name,String school){
			super(name);
			this.school = school;
			System.out.println("execute Student(name,school)");
		}
	}

	class PostGraduate extends Student{
		String guide;
		public PostGraduate(){
			System.out.println("execute PostGraduate()");
		}
		public PostGraduate(String name,String school,String guide) {
			super(name,school);
			this.guide = guide;
			System.out.println("execute PostGraduate(name,school,guide)");
		}

		class Test{
			public static void main(String[] args) {
				PostGraduate pgdt = null;
				pgdt = new PostGraduate();
				System.out.println();
				pgdt = new PostGraduate("刘志同","北京大学","王老师");
			}
		}
	}
}
